]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
network: Use activeApChanged to get the initial active network
authorJasper St. Pierre <jstpierre@mecheye.net>
Fri, 26 Apr 2013 01:04:32 +0000 (21:04 -0400)
committerJasper St. Pierre <jstpierre@mecheye.net>
Fri, 26 Apr 2013 16:16:06 +0000 (12:16 -0400)
https://bugzilla.gnome.org/show_bug.cgi?id=698918

js/ui/status/network.js

index 2cef443b9a9902f1d7f565a127bf53c558077fa1..9f53ce5262219dc4852973771aa665810078cfb6 100644 (file)
@@ -911,16 +911,7 @@ const NMDeviceWireless = new Lang.Class({
         for (let i = 0; i < this._networks.length; i++)
             sortAccessPoints(this._networks[i].accessPoints);
 
-        if (this.device.active_access_point) {
-            let networkPos = this._findNetwork(this.device.active_access_point);
-
-            if (networkPos == -1) // the connected access point is invisible
-                this._activeNetwork = null;
-            else
-                this._activeNetwork = this._networks[networkPos];
-        } else {
-            this._activeNetwork = null;
-        }
+        this._activeApChanged();
         this._networks.sort(this._networkSortFunction);
 
         this._apChangedId = device.connect('notify::active-access-point', Lang.bind(this, this._activeApChanged));